package uk.co.q3c.deplan.client.ui.mock.service;

import java.util.List;

import uk.co.q3c.deplan.client.domain.DomainKind;
import uk.co.q3c.deplan.client.domain.DomainObject;
import uk.co.q3c.deplan.client.domain.dag.DAG;
import uk.co.q3c.deplan.client.domain.dag.Hierarchy;
import uk.co.q3c.deplan.client.domain.task.BaseTask;
import uk.co.q3c.deplan.client.domain.task.Task;
import uk.co.q3c.deplan.client.service.TaskService;
import uk.co.q3c.deplan.client.service.TaskServiceAsync;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.googlecode.objectify.Key;

public class TaskServiceAsyncMock implements TaskServiceAsync {
	// this is injected - the server side task service.
	private TaskService taskService;

	@Override
	public void closeSession(AsyncCallback<Void> callback) {
		taskService.closeSession();
		callback.onSuccess(null);
	}

	@Override
	public void countPlanManagers(AsyncCallback<Integer> callback) {
		int r = taskService.countPlanManagers();
		callback.onSuccess(r);

	}

	@Override
	public void countAbstractTasks(AsyncCallback<Integer> callback) {
		throw new RuntimeException("not yet implemented");

	}

	@Override
	public void countProjects(AsyncCallback<Integer> callback) {
		throw new RuntimeException("not yet implemented");

	}

	@Override
	public void discard(DomainObject dob, AsyncCallback<Void> callback) {
		throw new RuntimeException("not yet implemented");

	}

	@Override
	public void findById(long id, AsyncCallback<Task> callback) {
		throw new RuntimeException("not yet implemented");

	}

	@Override
	public void findById(DomainKind domainKind, long id, AsyncCallback<Task> callback) {
		throw new RuntimeException("not yet implemented");

	}

	@Override
	public void findFirstByName(List<Class<? extends DomainObject>> taskClasses, String name, AsyncCallback<Task> callback) {
		throw new RuntimeException("not yet implemented");

	}

	@Override
	public void save(DomainObject dob, AsyncCallback<Void> callback) {
		throw new RuntimeException("not yet implemented");

	}

	@Override
	public <T extends DomainObject> void getObjectFromKey(Key<T> key, AsyncCallback<T> callback) {
		throw new RuntimeException("not yet implemented");

	}

	@Override
	public void getDag(AsyncCallback<DAG<Key<? extends Task>>> callback) {
		// TODO Auto-generated method stub

	}

	@Override
	public void getHierarchy(AsyncCallback<Hierarchy<Key<? extends Task>>> callback) {
		// TODO Auto-generated method stub

	}

	@Override
	public <T extends Task> void keyFor(T domainObject, AsyncCallback<Key<T>> callback) {
		// TODO Auto-generated method stub

	}

	@Override
	public void parentOf(Task task, AsyncCallback<BaseTask> callback) {
		// TODO Auto-generated method stub

	}

	@Override
	public void predecessorsOf(Task task, AsyncCallback<List<Task>> callback) {
		// TODO Auto-generated method stub

	}

	@Override
	public void save(Task task, AsyncCallback<Void> callback) {
		// TODO Auto-generated method stub

	}

	@Override
	public void setHierarchy(Hierarchy<Key<? extends Task>> hierarchy, AsyncCallback<Void> callback) {
		// TODO Auto-generated method stub

	}

	@Override
	public void subTaskCountFor(BaseTask summaryTask, AsyncCallback<Integer> callback) {
		// TODO Auto-generated method stub

	}

	@Override
	public void subTasksKeysFor(BaseTask summaryTask, AsyncCallback<List<Key<? extends Task>>> callback) {
		// TODO Auto-generated method stub

	}

	@Override
	public void subTasksOf(BaseTask summaryTask, AsyncCallback<List<? extends Task>> callback) {
		// TODO Auto-generated method stub

	}

	@Override
	public void successorsOf(Task abstractTask, AsyncCallback<List<Task>> callback) {
		// TODO Auto-generated method stub

	}

	@Override
	public void childCount(BaseTask at1, AsyncCallback<Integer> callback) {
		// TODO Auto-generated method stub

	}

	@Override
	public void pushDown(Task task, AsyncCallback<Void> callback) {
		// TODO Auto-generated method stub

	}

	@Override
	public void rollup(Task task, AsyncCallback<Void> callback) {
		// TODO Auto-generated method stub

	}

	@Override
	public void taskIsAtomic(Task task, AsyncCallback<Boolean> callback) {
		// TODO Auto-generated method stub

	}

}
